package team.scau.laboratory_repair.config;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import team.scau.laboratory_repair.common.utils.PropTool;

/**
 * @author 30254
 * creadtedate:2018/9/17
 */
@Component
public class InitAction implements ApplicationListener<ContextRefreshedEvent> {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        if(event.getApplicationContext().getParent() == null){
            PropTool.use("config/repair.properties","UTF-8");
        }
    }
}
